﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace CustomControls.Controls
{
    public class FixedTabItem : TabItem
    {
        static FixedTabItem()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(FixedTabItem), new FrameworkPropertyMetadata(typeof(FixedTabItem)));
        }

        private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            d.SetValue(e.Property, e.NewValue);
        }

        /// <summary>
        /// Tb否被选中
        /// </summary>
        public bool IsTbSelected
        {
            get { return (bool)GetValue(IsTbSelectedProperty); }
            set { SetValue(IsTbSelectedProperty, value); }
        }
        public static readonly DependencyProperty IsTbSelectedProperty =
            DependencyProperty.Register("IsTbSelected", typeof(bool), typeof(FixedTabItem), new PropertyMetadata(true, OnPropertyChanged));
    }
}
